package com.b.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.List;

/**
 * 用户收藏夹表
 */
@Document(indexName = "favorite")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Favorite {
    /**
     * 主键
     */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
     * 用户ID
     */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer userId;

    /**
     * 收藏夹标题
     */
    @Field(type = FieldType.Text, index = true , store = true, analyzer = "ik_max_word")
    private String title;

    /**
     * 收藏夹封面
     */
    private String cover;

    /**
     * 收藏夹描述
     */
    @Field(type = FieldType.Text, index = true , store = true, analyzer = "ik_max_word")
    private String content;

    /**
     * 隐私状态（0-公开，1-私有）
     */
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer privacyStatus;

    private List<Video> vedioList;//关联属性

}